/* -----------------------------------------------------------------------------
 * PROJECT    : net.lwf
 * FILE       : HomonymAction.java
 *
 * HISTORY:
 * Date          Author                        Description
 * ----------------------------------------------------------------------------- 
 * Dec 16, 2008       Raghu Sarraff			       Created
 */
package lwf.web.struts.action.english;

import javax.servlet.http.HttpServletRequest;

import lwf.handler.english.HomonymHandler;
import lwf.handler.english.WordHandler;
import lwf.web.struts.action.form.english.WordDisplayActionForm;

import net.lwf.web.constant.IPageTitle;

import org.apache.struts.action.ActionForm;


/**
 * Type the class description here
 *  
 */
public class HomonymAction extends SightWordAction {
	
	/**
	 * @see net.lwf.web.struts.action.english.WordAction#getHandler(HttpServletRequest)
	 */
	public WordHandler getHandler(HttpServletRequest request, ActionForm form) {
        int start = getStart(request);
        int end = getEnd(request);
        
        WordDisplayActionForm wdaf = (WordDisplayActionForm) form;
		HomonymHandler handler = null;
		if(wdaf.getGradeLevel() != 0) {
			handler = new HomonymHandler(start, end, wdaf.getGradeLevel());
		}
		return new HomonymHandler(start, end);
		
	}
	
	@Override
	public String getPageTitle() {
		return IPageTitle.HOMONYMS;
	}

	@Override
	public String getMainTitle() {
		return null;
	}

	@Override
	public String getPdfLink() {
		return null;
	}

	@Override
	public String getQuizLink() {
		return null;
	}

}

